var validateinfo = "请输入用户名和密码";
var title = "留学生管理系统";
var stuLable = "学生";
var teaLable = "教师";
var adminLable = "管理员"
var loginButton = "登   录"
var language = "Chinese";

function setLanguage(lan){
    language = lan;
    if (language != "Chinese"){
        validateinfo = "Username or Password can't be blank";
        title = "Overseas Students Management System";
        stuLable = "Student";
        teaLable = "Teacher";
        adminLable = "Admin";
        loginButton = "Login";
    }else if(language == "Chinese"){
        validateinfo = "请输入用户名和密码";
        title = "留学生管理系统";
        stuLable = "学生";
        teaLable = "教师";
        adminLable = "管理员"
        loginButton = "登   录";
    }
    onload();
}
function validate(){
    if($("#username").val() == '' || $("#password").val() == ''){
        $("#message").html(validateinfo)
        return false;
    }
}
function onload(){
    $("#message").html("");
    if($("#servermessage").val() != ""){
        $("#message").html($("#servermessage").val());
    }
    $("#title").html(title);
    $("#stuLable").html(stuLable);
    $("#teaLable").html(teaLable);
    $("#adminLable").html(adminLable);
    $("#login-button").val(loginButton);
}

onload();